﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Net.Mail;
using System.Text;
using System.Configuration;
using DalatCooking.Core;
using DalatCooking.Core.Helper;

public partial class admin_Settings_Email : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected override void OnInit(EventArgs e)
    {
        LoadConfig();

        if (!IsPostBack)
        {
            Person p = Session.GetPersonLogged();
            if (!p.IsInRole("SuperUser"))
                Response.Redirect("/admin/accessdeny.aspx");
        }
        base.OnInit(e);
    }
    void LoadConfig()
    {
      //  txtEmail.Text = Setting.String("SMTP_EMAIL");
       // txtSmtpServer.Text = Setting.String("SMTP_SERVER");
      //  txtSmtpUsername.Text = Setting.String("SMTP_USERNAME");
      //  txtSmtpServerPort.Text = Setting.String("SMTP_PORT");
       // txtSmtpPassword.Text = Setting.String("SMTP_PASSWORD");
       // txtEmailSubjectPrefix.Text = Setting.String("SMTP_PASSWORD");
        cbEnableSsl.Checked = Setting.Boolean("SMTP_SSL");
    }
}